﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ArduinoAnalyzer.SemanticAnalysis
{
    public class Symbol
    {
        public Symbol(string identifier, Type type)
        {
            _identifier = identifier;
            _temporaryIdentifier = identifier;
            _type = type;
        }

        public Symbol(string identifier, string temporaryIdentifier, Type type)
        {
            _identifier = identifier;
            _temporaryIdentifier = temporaryIdentifier;
            _type = type;
        }

        private string _identifier;
        public string Identifier
        {
            get { return string.IsNullOrEmpty(_temporaryIdentifier) ? _identifier : _temporaryIdentifier; }
        }

        public string OriginalIdentifier
        {
            get { return _identifier; }
        }

        private string _temporaryIdentifier = null;
        public string TemporaryIdentifier
        {
            get { return _temporaryIdentifier; }
        }

        private Type _type;
        public Type Type
        {
            get { return _type; }
        }
    }
}
